package com.dzh.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName uesr
 */
@TableName(value ="uesr")
@Data
public class Uesr implements Serializable {
    /**
     * 用户ID
     */
    @TableId(type = IdType.AUTO)
    private Integer uid;

    /**
     * 用户名称
     */
    private String uname;

    /**
     * 用户身份证号
     */
    private String identitycard;

    /**
     * 用户手机号
     */
    private String cellphonenumber;

    /**
     * 用户积分
     */
    private Integer unum;

    /**
     * 贷款额度
     */
    private Long quantity;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Uesr other = (Uesr) that;
        return (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getUname() == null ? other.getUname() == null : this.getUname().equals(other.getUname()))
            && (this.getIdentitycard() == null ? other.getIdentitycard() == null : this.getIdentitycard().equals(other.getIdentitycard()))
            && (this.getCellphonenumber() == null ? other.getCellphonenumber() == null : this.getCellphonenumber().equals(other.getCellphonenumber()))
            && (this.getUnum() == null ? other.getUnum() == null : this.getUnum().equals(other.getUnum()))
            && (this.getQuantity() == null ? other.getQuantity() == null : this.getQuantity().equals(other.getQuantity()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getUname() == null) ? 0 : getUname().hashCode());
        result = prime * result + ((getIdentitycard() == null) ? 0 : getIdentitycard().hashCode());
        result = prime * result + ((getCellphonenumber() == null) ? 0 : getCellphonenumber().hashCode());
        result = prime * result + ((getUnum() == null) ? 0 : getUnum().hashCode());
        result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", uid=").append(uid);
        sb.append(", uname=").append(uname);
        sb.append(", identitycard=").append(identitycard);
        sb.append(", cellphonenumber=").append(cellphonenumber);
        sb.append(", unum=").append(unum);
        sb.append(", quantity=").append(quantity);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}